<template>
  <div class="bookPage_box">
    <!-- Breadcrumb 面包屑----开始 -->
    <el-breadcrumb separator-class="el-icon-arrow-right"
                   style="line-height:40px;cursor: pointer;margin-left:20px;">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/queryTrips'}">列车查询</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/queryTrips'}">列车查询</el-breadcrumb-item>

    </el-breadcrumb>
    <!-- Breadcrumb 面包屑----结束 -->
    <el-container>
      <el-container>
        <!-- 填写并核对信息 -->
        <el-header>填写并核对信息</el-header>
        <!-- 车次信息 -->
        <el-main>
          <div class="k-bd1">
            <div class="k-top ">
              <span>车次信息</span>
              <a href="QueryTrips.html">返回修改车次</a>
            </div>
            <div class="train_info">
              <div class="k-tarins">
                <h4 class="FromStation">上海虹桥</h4>
                <p class="time FromTime">06:32</p>
                <p class="date FromDate">2020-01-09</p>
              </div>

              <div class="k-tarin-number k-tarins">
                <p><b class="TrainNo">Z636</b></p>
                <div class="k-tran-ico"></div>
                <p class="during dateTime">历时5小时19分钟</p>
              </div>

              <div class="k-tarins k-tr">
                <h4 class="ToStation">北京</h4>
                <p class="time ToTime">11:32</p>
                <p class="date ToDate ">2020-01-10</p>
              </div>
            </div>
          </div>
        </el-main>
        <!-- 坐席信息 -->
        <el-header>坐席信息
          <span class="seat-tips">卧铺上/中/下随机分配，暂收下铺价格，差价1-15个工作日左右退回您的支付账户。</span>
        </el-header>
        <el-main>
          <div class="k-bd2 ">
            <ul id="ticket-type-content"
                class="clearfix">
              <li class="none hasTicket"
                  v-for="seat in SeatDetails">
                <div class="seat-box">
                  <div>
                    <div class="seat-item"
                         v-for="name in seat.SeatName">
                      <span>{{ name.Name }}</span>
                      <b> <var>￥</var>{{ name.price }} </b>
                    </div>
                    <p>
                      <cite class="k-enough">无票</cite>
                    </p>
                  </div>
                </div>
              </li>
            </ul>
          </div>
        </el-main>
        <!-- 乘客信息 -->
        <el-header>乘客信息
          <span class="k-ckinfo">常用乘客:</span>
          <span id="user-customers">{{ PassengerForm.userName }}</span>
          <!-- <dl class="k-ckinfo">
          <dt>常用乘客：</dt>
          <dd id="user-customers">xxx</dd>
       </dl> -->
        </el-header>
        <!-- 联系人列表 -->
        <el-main>
          <div class="contactList">
            <div class="k-ckallinfo">
              <div class="k-ck-row lxr-content clearfix parent-container"
                   id="0"
                   data-passenger-type="1">
                <div class="left-passener">
                  <span class="num-bg">1</span> 成人票
                </div>
                <div class="k-ck-con">
                  <el-form :model="PassengerForm"
                           :rules="PassengerFormRules"
                           ref="PassengerForm">
                    <!-- 姓名 -->
                    <el-form-item label="姓名:"
                                  label-width="110px"
                                  :inline="true"
                                  prop="userName">
                      <!-- <span class='formLabel'>姓名:</span> -->
                      <el-input v-model="PassengerForm.userName"
                                placeholder="请按照购票所持证填写乘客姓名"
                                style="width:373px;"
                                auto-complete="off"></el-input>
                      <!-- 保存为常用乘客 -->
                      <el-checkbox v-model="PassengerForm.SaveUserCk">保存为常用乘客</el-checkbox>
                    </el-form-item>
                    <!-- 证件信息/ -->
                    <el-form-item label="证件信息:"
                                  label-width="110px"
                                  prop="IDInfoNum">
                      <!-- <span class='formLabel'>证件信息:</span> -->
                      <el-select v-model="PassengerForm.IDInfo"
                                 placeholder="请选择"
                                 style="width:130px;">
                        <el-option label="身份证"
                                   value="1"></el-option>
                        <el-option label="护照"
                                   value="B"></el-option>
                        <el-option label="台湾通行证"
                                   value="G"></el-option>
                        <el-option label="港澳通行证"
                                   value="C"></el-option>
                        <el-option label="外国人永久居留身份证"
                                   value="H"></el-option>
                      </el-select>
                      <el-input v-model="PassengerForm.IDInfoNum"
                                placeholder="证件号码"
                                style="width:240px;"
                                maxlength="18"
                                show-word-limit
                                auto-complete="off"></el-input>
                    </el-form-item>
                    <!-- 外国人永久居留身份证选中 ------开始-->
                    <div class="clearfix foreignbox"
                         v-if="PassengerForm.IDInfo == 'H'">
                      <!-- 性别 -->
                      <el-form-item label="性别:"
                                    label-width="110px"
                                    :inline="true"
                                    prop="sex">
                        <el-select v-model="PassengerForm.sex"
                                   placeholder="请选择"
                                   style="width:130px;">
                          <el-option label="男"
                                     value="男"
                                     name="male"></el-option>
                          <el-option label="女"
                                     value="女"
                                     name="wmale"></el-option>
                        </el-select>
                      </el-form-item>
                      <!-- 出生日期 -->
                      <el-form-item label="出生日期:"
                                    label-width="110px"
                                    prop="dateOfBirth">
                        <div class="dateOfBirth">
                          <el-date-picker v-model="PassengerForm.dateOfBirth"
                                          type="date"
                                          placeholder="选择出生日期"
                                          style="width:373px;">
                          </el-date-picker>
                        </div>
                      </el-form-item>
                      <!-- 证件有效期 -->
                      <el-form-item label="证件有效期:"
                                    label-width="110px"
                                    prop="Cvp">
                        <div class="dateOfBirth">
                          <el-date-picker v-model="PassengerForm.Cvp"
                                          type="date"
                                          placeholder="选择出生日期"
                                          style="width:373px;">
                          </el-date-picker>
                        </div>
                      </el-form-item>
                      <!-- 国家 -->
                      <el-form-item label="国家:"
                                    label-width="110px"
                                    prop="country">
                        <el-select v-model="PassengerForm.country.city"
                                   placeholder="请选择国家"
                                   style="width:373px;">
                          <el-option v-for="citys in PassengerForm.country"
                                     :key="citys.value"
                                     :label="citys.city"
                                     :value="citys.value"></el-option>
                        </el-select>
                      </el-form-item>
                    </div>
                    <!-- 外国人永久居留身份证选中 ------结束-->
                    <!-- 添加儿童 -->
                    <el-form-item label=""
                                  label-width="110px"
                                  :inline="true">
                      <a class="add-child"
                         @click="addChildClick">+ 添加同行儿童</a>
                      每名成年乘客可免费携1名身高不足1.2米的儿童，该儿童可不用购票
                    </el-form-item>
                  </el-form>
                </div>
                <!-- 添加乘客 -->
                <div class="add-passenger">
                  <el-button type="primary"
                             icon="el-icon-plus"
                             @click="Add_passenger('PassengerForm')">添加乘客</el-button>
                  <span>已添加
                    <i class="already-add addnum">1</i> 位乘客,还可以添加
                    <i class="remain-add addnum">4</i> 位乘客</span>
                </div>
                <!-- 删除乘客 -->
                <div class="kclear"></div>
              </div>
            </div>
          </div>
        </el-main>
        <!-- 联系人信息 -->
        <el-header>联系人信息</el-header>
        <el-main>
          <span style="margin-left:100px;">常用联系人:</span>
          <span id="user-customers">{{ PassengerForm.userName }}</span>
          <!-- 常用联系人表单 -->
          <div class="user-contacts">
            <el-form :model="userContacts"
                     ref="userContacts"
                     :rules="userContactsRules">
              <!-- 姓名 -->
              <el-form-item label="姓名:"
                            label-width="110px"
                            :inline="true"
                            prop="name">
                <el-input v-model="userContacts.name"
                          placeholder="中文名/英文名"
                          style="width:373px;"
                          auto-complete="off"></el-input>
              </el-form-item>
              <!-- 手机号 -->
              <el-form-item label="手机号码:"
                            label-width="110px"
                            :inline="true"
                            prop="phoneNum">
                <el-input v-model="userContacts.phoneNum"
                          placeholder="用于接收预订出票信息，非常重要"
                          style="width:373px;"
                          auto-complete="off"></el-input>
              </el-form-item>
            </el-form>
          </div>
        </el-main>
        <!-- //分割线 -->
        <el-divider content-position="center"><i class="el-icon-s-order"></i>提交订单——————请阅读条款协议</el-divider>
        <el-footer>
          <!-- 提交订单 -->
          <div class="order-submit">
            <div class="license-text">
              <el-checkbox v-model="readerChecked"
                           @change="disableChange">我已完成阅读<a target="_blank"
                   href="/protocol/protocol.html">《火车票平台用户协议》</a>并接受所有条款</el-checkbox>
            </div>
            <el-button type="primary"
                       class="sub-btn"
                       :plain="true"
                       id="submit-form"
                       :disabled="isDisabled"
                       @click="submitFrom('PassengerForm')">提交订单</el-button>
          </div>
        </el-footer>
      </el-container>
      <!-- 右边详情 -->
      <el-aside width="400px">
        <el-collapse v-model="Collapse.activeNames"
                     @change="handleChange">
          <el-collapse-item title="票价信息"
                            name="1">
            <!-- 成人票价信息 -->
            <div class="od_money p_title adult_ticket">
              <span class="od_left_info ticket_type">
                <el-tag type="warning">成人票</el-tag>
              </span>
              <span class="od_right_info">
                <i class="od_price">￥ 315.0</i>
                <i class="od_nums">X 1</i>
              </span>
              <!-- 坐席信息 -->
              <P><span class="od_left_info">
                  <el-tag type="warning">坐席信息</el-tag>
                </span>
                <span class="od_right_info">
                  <i class="seat_type">
                    <el-tag type="warning">硬座</el-tag>
                  </i>
                </span></P>
            </div>
            <!-- 儿童票价信息 -->
            <div class="od_money od_title child_ticket"
                 style="display:block">
              <span class="od_left_info ticket_type">
                <el-tag type="warning">儿童票</el-tag>
              </span>
              <span class="od_right_info">
                <i class="od_price">￥ 315.0</i>
                <i class="od_nums">X 1</i>
              </span>
              <!-- 坐席信息 -->
              <div><span class="od_left_info">
                  <el-tag type="warning">坐席信息</el-tag>
                </span>
                <span class="od_right_info">
                  <i class="seat_type">
                    <el-tag type="warning">硬座</el-tag>
                  </i>
                </span></div>
            </div>
            <el-divider><i class="el-icon-s-promotion"></i></el-divider>
            <!-- 去程总价 -->
            <div class=" od_title">
              <span class="od_left_info">
                <el-tag type="danger">去程总价</el-tag>
              </span>
              <span class="od_right_info">
                <i class="price_total">￥ 315.0</i>
              </span>
            </div>
          </el-collapse-item>
          <el-collapse-item title="温馨提示"
                            name="2">
            <!--温馨提示-->
            <div class="wxts">
              <!-- <h5 style="padding:5px;">温馨提示</h5> -->
              <ul>
                <li>
                  <p>因火车票实名制购买规定，我司只为真实的消费者代购火车票，我方有权在核实购票人身份时，要求客户提供身份证复印件核实购票人的身份，购票人身份核实通过后，才能完成购票，退票及退款，否则我司不提供售后服务。若行为严重违反铁路机关相关规定的，我司将主动配合公安机关进行查处。</p>
                </li>
                <li>
                  <p>自取票（预售期为30天）：</p>
                  <p>22:55-6:00支付完成，6：30前回复是否有票。</p>
                  <p>6:00-22:55支付完成，支付成功后15分钟内回复是否出票成功。</p>

                </li>
                <li>
                  <p>送票上门、VIP取票（预售期28天）：</p>
                  <p>00:00-08:00支付完成，9点前回复是否有票；</p>
                  <p>
                    08:00-16:00支付完成，1小时内回复是否有票；
                  </p>
                  <p>16:00-24:00支付完成，最晚次日9:00前回复；</p>
                  <p>预售期外的订单，预售期当天18:30前回复；</p>
                  <p>送票上门、VIP取票不提供退改签，您可前往火车站进行退改签服务。</p>
                </li>
                <li>
                  <p>极速预订服务仅针对套餐用户，选择套餐后携程将为您极速代购，或者您可以通过自己12306的账号购票，无需购买套餐</p>
                </li>
                <li>
                  <p>短信通知您，因运营商网关延迟可能导致您无法及时接收短信，请到我的订单中跟踪出票情况。</p>
                </li>
                <li>
                  <p>支付成功并非100%有票，如不能出票，1-3个工作日退款至您的支付账户。</p>
                </li>
                <li>
                  <p>如遇列车停运，请最晚在发车前25分钟进行线上退票，我司将退回全款。如果已经取出车票或者列车已过发车时间，请您务必在30日内（含出发日）前往车站退票，全款将按支付渠道退回。</p>
                </li>
                <li>
                  <p>
                    由我司提供的套餐等服务类产品，出行前支持无理由退款，出行后不支持退款。
                  </p>
                </li>
              </ul>

            </div>
          </el-collapse-item>
          <el-collapse-item title="敬请期待"
                            name="3">
            <p>敬请期待</p>
          </el-collapse-item>
          <el-collapse-item title="敬请期待"
                            name="4">
            <p>敬请期待</p>
          </el-collapse-item>
        </el-collapse>

      </el-aside>
    </el-container>

    <!-- <div class="od_right">
    <el-container>
    <el-main>Main</el-main>
  </el-container>
</div> -->
  </div>
</template>

<script>
export default {
  name: "bookPage",
  components: {},
  data () {
    //中英文名验证
    // const EnAndChnName = (rule, value, callback) => {
    //   if (!value) {
    //     callback(new Error('请输入中文名/英文名'))
    //   } else {
    //     const reg = /^[a-zA-Z]+$/ // 验证没有空格的英文名
    //     const reg = /^[a-zA-Z][A-Za-z\s]*[a-zA-Z]*$/ //验证有空格的英文名
    //     if (value.length < 100 && reg.test(value)) {
    //       callback()
    //     } else {
    //       return callback(new Error('请输入正确的中文名/英文名'))
    //     }
    //   }
    // }
    // 设置手机号的验证规则
    const checkPhoneNum = (rule, value, callback) => {
      if (!value) {
        callback(new Error('请输入联系方式'))
      } else {
        const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
        if (reg.test(value)) {
          callback()
        } else {
          return callback(new Error('请输入正确的电话'))
        }
      }
    }
    return {
      //折叠面板
      Collapse: {
        activeNames: ['1']//折叠面板默认选中
        , ticketType: ''//订票类型--成人--儿童
        , adultPrice: ''//成人票价
        , adultNums: ''//成人购票数量
        , childPrice: ''//儿童票价
        , childNums: ''//儿童购票数量
        , seatName: ''//坐席名称
        , priceTotal: ''//去程总价
      },
      //是否禁用提交按钮
      isDisabled: true,
      //已阅读chekbox
      readerChecked: false,
      //联系人信息:
      userContacts: {
        name: "", //常用联系人姓名
        phoneNum: "" //常用联系人手机号
      },
      //乘客表单信息
      PassengerForm: {
        userName: "", //乘客姓名
        IDInfo: "", //证件信息
        IDInfoNum: "", //证件号码
        SaveUserCk: true, //保存为常用旅客
        sex: "", //性别
        dateOfBirth: "", //出生日期
        Cvp: "", //证件有效日期
        country: [
          //国家
          { city: "美国UNITEDSTATES", value: "US" },
          { city: "阿富汗AFGHANISTANA", value: "AF" },
          { city: "阿尔巴尼亚ALBANIA", value: "AL" },
          { city: "阿尔及利亚ALGERIA", value: "DZ" },
          { city: "安道尔ANDORRA", value: "AD" },
          { city: "安提瓜和巴布达ANTIGUABARBUDA", value: "AG" },
          { city: "阿拉伯联合酋长国ARAB", value: "AE" },
          { city: "阿根廷ARGENTINA", value: "AR" },
          { city: "亚美尼亚ARMENIA", value: "AM" },
          { city: "阿鲁巴ARUBA", value: "AW" },
          { city: "澳大利亚AUSTRALIA", value: "AU" },
          { city: "奥地利AUSTRIA", value: "AT" },
          { city: "阿塞拜疆共和国AZERBAIJAN", value: "AZ" },
          { city: "巴哈马BAHAMAS", value: "BS" },
          { city: "巴林BAHRAIN", value: "BH" },
          { city: "巴巴多斯BARBADOS", value: "BB" },
          { city: "白俄罗斯BELARUS", value: "BY" },
          { city: "比利时BELGIUM", value: "BE" },
          { city: "伯里兹BELIZE", value: "BZ" },
          { city: "贝宁BENIN", value: "BJ" },
          { city: "不丹BHUTAN", value: "BT" },
          { city: "玻利维亚BOLIVIA", value: "BO" },
          { city: "波斯尼亚和黑塞哥维那BOSNIA", value: "BA" },
          { city: "博茨瓦纳BOTSWANA", value: "BW" },
          { city: "巴西BRAZIL", value: "BR" },
          { city: "保加利亚BULGARIA", value: "BG" },
          { city: "布基纳法索BURKINAFASO", value: "BF" },
          { city: "布基纳法索BURKINAFASO", value: "BF" },
          { city: "布隆迪BURUNDI", value: "BI" },
          { city: "文莱BruneiDarussalam", value: "BN" },
          { city: "柬埔寨CAMBODIA", value: "KH" },
          { city: "喀麦隆CAMEROON", value: "CM" },
          { city: "加拿大CANADA", value: "CA" },
          { city: "佛得角CAPEVERDE", value: "KY" },
          { city: "乍得CHAD", value: "TD" },
          { city: "智利CHILE", value: "CL" },
          { city: "哥伦比亚COLOMBIA", value: "CO" },
          { city: "科摩罗COMOROS", value: "KM" },
          { city: "刚果（布）CONGO", value: "CG" },
          { city: "库克群岛COOKISLANDS", value: "CK" },
          { city: "科特迪瓦COTEDLVOIRE", value: "CI" },
          { city: "克罗地亚CROATIA", value: "HR" },
          { city: "古巴共和国CUBA", value: "CU" },
          { city: "塞浦路斯CYPRUS", value: "CY" },
          { city: "捷克共和国CZECHREPUBLIC", value: "CZ" },
          { city: "中非共和国Central Africa Republic", value: "CF" },
          { city: "哥斯达黎加CostaRica", value: "CRC" },
          { city: "刚果（金）DEMOCRATIC REPUBLIC OF CONGO", value: "CD" },
          { city: "也门民主人民共和国DEMOCRATICYEMEN", value: "YD" },
          { city: "丹麦DENMARK", value: "DK" },
          { city: "吉布提DJIBOUTI", value: "DJ" },
          { city: "多米尼克DOMINICA", value: "DM" },
          { city: "多米尼加DOMINICAN REPUBLIC", value: "DO" },
          { city: "厄瓜多尔ECUADOR", value: "EC" },
          { city: "埃及EGYPT", value: "EG" },
          { city: "萨尔瓦多EL SALVADOR", value: "EV" },
          { city: "赤道几内亚EQUATORIALGUINEA", value: "GQ" },
          { city: "厄立特里亚ERITREA", value: "ER" },
          { city: "厄立特里亚ERITREA", value: "ER" },
          { city: "爱沙尼亚ESTONIA", value: "EE" },
          { city: "埃塞俄比亚ETHIOPIA", value: "ET" },
          { city: "斐济FIJI", value: "FJ" },
          { city: "芬兰FINLAND", value: "FI" },
          { city: "法国FRANCE", value: "FR" },
          { city: "加蓬GABON", value: "GA" },
          { city: "冈比亚GAMBIA", value: "GM" },
          { city: "格鲁吉亚GEORGIA", value: "CE" },
          { city: "德国GERMANY", value: "DE" },
          { city: "加纳GHANA", value: "GH" },
          { city: "希腊GREECE", value: "GR" },
          { city: "格林纳达GRENADA", value: "GL" },
          { city: "几内亚GUINEA", value: "GN" },
          { city: "几内亚比绍GUINEABISSAU", value: "GW" },
          { city: "圭亚那GUYANA", value: "GY" },
          { city: "危地马拉Guatemala", value: "GT" },
          { city: "海地HAITI", value: "HT" },
          { city: "荷兰HOLLAND", value: "NL" },
          { city: "洪都拉斯HONDURAS", value: "HN" },
          { city: "匈牙利HUNGARY", value: "HU" },
          { city: "冰岛ICELAND", value: "IS" },
          { city: "冰岛ICELAND", value: "IS" },
          { city: "印度INDIA", value: "IN" },
          { city: "印度尼西亚INDONESIA", value: "ID" },
          { city: "伊朗IRAN", value: "IR" },
          { city: "伊拉克IRAQ", value: "IQ" },
          { city: "爱尔兰IRELAND", value: "IE" },
          { city: "以色列ISRAEL", value: "IL" },
          { city: "意大利ITALY", value: "IT" },
          { city: "牙买加JAMAICA", value: "JM" },
          { city: "日本JAPAN", value: "JP" },
          { city: "约旦JORDAN", value: "JO" },
          { city: "哈萨克斯坦KAZAKHSTAN", value: "KZ" },
          { city: "肯尼亚KENYA", value: "KE" },
          { city: "吉尔吉斯共和国KIRGIZSTAN", value: "KG" },
          { city: "基里巴斯KIRIBATI", value: "KI" },
          { city: "韩国KOREA", value: "KR" },
          { city: "科威特KUWAIT", value: "KW" },
          { city: "朝鲜Korea", value: "DPR" },
          { city: "老挝LAOS", value: "LA" },
          { city: "拉脱维亚LATVIA", value: "LV" },
          { city: "黎巴嫩LEBANON", value: "LB" },
          { city: "莱索托LESOTHO", value: "LS" },
          { city: "利比里亚LIBERIA", value: "LR" },
          { city: "利比亚LIBYA", value: "LY" },
          { city: "列支敦士登LIECHTENSTEIN", value: "LI" },
          { city: "立陶宛LITHUANIA", value: "LT" },
          { city: "卢森堡LUXEMBOURG", value: "LU" },
          { city: "马其顿MACEDONIA", value: "MK" },
          { city: "马达加斯加MADAGASCAR", value: "MG" },
          { city: "马拉维MALAWI", value: "MW" },
          { city: "马来西亚MALAYSIA", value: "MY" },
          { city: "马尔代夫MALDIVES", value: "MV" },
          { city: "马里MALI", value: "ML" },
          { city: "马耳他MALTA", value: "MT" },
          { city: "马绍尔群岛MARSHALL ISLANDS", value: "MH" },
          { city: "毛里塔尼亚MAURITANIA", value: "MR" },
          { city: "毛里求斯MAURITIUS", value: "MU" },
          { city: "墨西哥MEXICO", value: "MX" },
          { city: "密克罗尼西亚联邦MICRONESIA", value: "FM" },
          { city: "摩尔多瓦MOLDOVA", value: "MD" },
          { city: "摩纳哥MONACO", value: "MC" },
          { city: "蒙古MONGOLIA", value: "MN" },
          { city: "黑山MONTENEGRO", value: "ME" },
          { city: "摩洛哥MOROCCO", value: "MA" },
          { city: "莫桑比克MOZAMBIQUE", value: "MZ" },
          { city: "缅甸MYANMAR", value: "MM" },
          { city: "纳米比亚NAMIBIA", value: "NA" },
          { city: "瑙鲁NAURU", value: "NR" },
          { city: "尼泊尔NEPAL", value: "NP" },
          { city: "新西兰NEWZEALAND", value: "NZ" },
          { city: "尼加拉瓜NICARAGUA", value: "NI" },
          { city: "尼日尔NIGER", value: "NE" },
          { city: "尼日利亚NIGERIA", value: "NG" },
          { city: "挪威NORWAY", value: "NO" },
          { city: "阿曼OMAN", value: "OM" },
          { city: "巴基斯坦PAKISTAN", value: "PK" },
          { city: "帕劳PALAU", value: "PW" },
          { city: "巴勒斯坦PALESTINE", value: "BL" },
          { city: "巴拿马PANAMA", value: "PA" },
          { city: "巴布亚新几内亚PAPUANEWGUINEA", value: "PG" },
          { city: "巴拉圭PARAGUAY", value: "PY" },
          { city: "秘鲁PERU", value: "PE" },
          { city: "菲律宾PHILIPPINES", value: "PH" },
          { city: "波兰POLAND", value: "PL" },
          { city: "葡萄牙PORTUGAL", value: "PT" },
          { city: "波多黎各PUERTO RICO", value: "PR" },
          { city: "卡塔尔QATAR", value: "QA" },
          { city: "罗马尼亚ROMANIA", value: "RO" },
          { city: "俄罗斯RUSSIA", value: "RU" },
          { city: "卢旺达RWANDA", value: "RW" },
          { city: "圣基茨和尼维斯SAINT KITTS", value: "KNA" },
          {
            city: "圣文森特和格林纳丁斯SAINT VINCENT AND THE GRENADIN",
            value: "VC"
          },
          { city: "圣卢西亚SAINTLUCIA", value: "LC" },
          { city: "美属萨摩亚SAMOA", value: "WS" },
          { city: "圣马力诺SANMARINO", value: "SM" },
          { city: "圣多美和普林西比SAOTOMEPRINCIPE", value: "ST" },
          { city: "沙特阿拉伯SAUDIARABIA", value: "SA" },
          { city: "塞内加尔SENEGAL", value: "SN" },
          { city: "塞尔维亚SERBIA", value: "CS" },
          { city: "塞舌尔SEYCHELLES", value: "SC" },
          { city: "塞拉利昂SIERRALEONE", value: "SL" },
          { city: "新加坡SINGAPORE", value: "SG" },
          { city: "斯洛伐克SLOVAKIA", value: "SK" },
          { city: "斯洛伐克共和国SLOVAKREPUBLIC", value: "SK" },
          { city: "斯洛文尼亚SLOVENIA", value: "SI" },
          { city: "所罗门群岛SOLOMON ISLANDS", value: "SB" },
          { city: "索马里SOMALI", value: "SO" },
          { city: "索马里SOMALIA", value: "SO" },
          { city: "南非SOUTHAFRICA", value: "ZA" },
          { city: "西班牙SPAIN", value: "ES" },
          { city: "斯里兰卡SRILANKA", value: "LK" },
          { city: "苏丹SUDAN", value: "SD" },
          { city: "苏里南SURINAM", value: "SR" },
          { city: "斯威士兰SWAZILAND", value: "SZ" },
          { city: "瑞典SWEDEN", value: "SE" },
          { city: "瑞士SWITZERLAND", value: "CH" },
          { city: "叙利亚SYRIA", value: "SY" },
          { city: "塔吉克斯坦TAJIKISTAN", value: "TJ" },
          { city: "坦桑尼亚TANZANIA", value: "TZ" },
          { city: "泰国THAILAND", value: "TH" },
          { city: "南苏丹共和国THE REPBLIC OF SOUTH SUDAN", value: "SS" },
          { city: "乌干达THE REPUBLIC OF UGANDA", value: "UGA" },
          { city: "东帝汶TIMOR", value: "TL" },
          { city: "多哥TOGO", value: "TG" },
          { city: "汤加TONGA", value: "TO" },
          { city: "特立尼达和多巴哥TRINIDADANDTOBAGO", value: "TT" },
          { city: "突尼斯TUNISIA", value: "TN" },
          { city: "土耳其TURKEY", value: "TR" },
          { city: "土库曼斯坦TURKMENISTAN", value: "TM" },
          { city: "乌克兰UKRAINE", value: "UKR" },
          { city: "英国UNITED KINGDOM", value: "GB" },
          { city: "乌兹别克斯坦UZBEKISTAN", value: "UZB" },
          { city: "乌拉圭Uruguay", value: "UY" },
          { city: "瓦努阿图VANUATU", value: "VU" },
          { city: "梵蒂冈VATICAN", value: "VA" },
          { city: "越南VIETNAM", value: "VIE" },
          { city: "委内瑞拉Venezuela", value: "VE" },
          { city: "赞比亚ZAMBIA", value: "ZM" },
          { city: "津巴布韦ZIMBABWE", value: "ZW" }
        ]
      },
      //联系人错误验证提示
      userContactsRules: {
        phoneNum: [
          { required: true, validator: checkPhoneNum, trigger: 'blur' }
          // {
          //   type: "number",
          //   required: true,
          //   message: "请输入手机号",
          //   trigger: "blur"
          // },
          // {
          //   pattern: /^1[34578]\d{9}$/,
          //   message: "手机号格式不对",
          //   trigger: "blur"
          // }
          // {validator: checkPhone, trigger: 'blur'}
        ],
        name: [
          { required: true, message: "姓名不能为空", trigger: "blur" },
          {
            min: 2,
            max: 10,
            message: "长度在 2 到 10 个字符",
            trigger: "blur"
          },
          {
            required: true,
            pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
            message: "姓名不支持特殊字符",
            trigger: "blur"
          }
        ]
      },
      //乘客信息错误验证
      PassengerFormRules: {
        userName: [
          { required: true, message: "姓名不能为空", trigger: "blur" },
          {
            min: 2,
            max: 10,
            message: "长度在 2 到 10 个字符",
            trigger: "blur"
          },
          {
            required: true,
            pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
            message: "姓名不支持特殊字符",
            trigger: "blur"
          }
        ],
        IDInfoNum: [
          { required: true, message: "证件号码不能为空", trigger: "blur" },
          {
            min: 15,
            max: 18,
            message: "请如实填写18位号码，以供购票,核对",
            trigger: "blur"
          },
          {
            pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/,
            // /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
            message: "请输入正确的证件号码",
            trigger: "blur"
          }
        ],
        sex: [{ required: true, message: "请选择性别", trigger: "change" }],
        dateOfBirth: [
          {
            type: "date",
            required: true,
            message: "请选择出生日期",
            trigger: "change"
          }
        ],
        Cvp: [
          {
            type: "date",
            required: true,
            message: "请选择证件有效日期",
            trigger: "change"
          }
        ],
        country: [{ required: true, message: "请选择国家", trigger: "blur" }]

      },
      //坐席名称
      SeatDetails: [
        {
          SeatName: [
            { Name: "软卧上", price: "111.1" },
            { Name: "软卧中", price: "111.1" },
            { Name: "软卧下", price: "111.1" }
          ]
        },
        {
          SeatName: [
            { Name: "硬卧上", price: "111.1" },
            { Name: "硬卧中", price: "111.1" },
            { Name: "硬卧下", price: "111.1" }
          ]
        },
        { SeatName: [{ Name: "硬座", price: "111.1" }] },
        { SeatName: [{ Name: "无座", price: "111.1" }] }
      ]
    };
  },
  methods: {
    //添加乘客
    Add_passenger () {
      alert("aaaa");
    },
    //当阅读条款选中时按钮可用
    disableChange () {
      if (this.readerChecked) {
        this.isDisabled = false;//选中提交订单
      } else {
        this.isDisabled = true;//未选择
        //提示
        const h = this.$createElement;
        this.$notify({
          title: '提示信息',
          message: h('i', { style: 'color: teal' }, '请勾选阅读用户协议'),
          position: 'bottom-right'
        });
      }
    },
    // 提交订单
    submitFrom (PassengerForm) {
      this.$refs[PassengerForm].validate(valid => {
        if (valid) {
          //条件成功
          this.$message({
            message: '恭喜你，订单提交成功',
            type: 'success'
          });

        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    //折叠面板事件
    handleChange (val) {
      console.log(val);
    },
    //添加儿童事件
    addChildClick () {
      alert('添加儿童')
    }
  }
};
</script>

<style scoped>
li {
  list-style-type: none;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  font-weight: bolder;
  line-height: 60px;
}
.el-footer {
  background-color: #f2f2f2;
  color: #333;
  font-weight: bolder;
  line-height: 60px;
}

.el-aside {
  background-color: #f2f2f2;
  color: #333;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
}

body > .el-container {
  margin-bottom: 40px;
}

.bookPage_box {
  width: 1500px;
  margin: 0 auto;
  background-color: #f8f8f8;
}
/*车次信息开始---------------*/
.k-bd1 .train_info {
  float: left;
  margin-left: 100px;
}
.k-bd1 .k-tarins {
  float: left;
  padding: 10px;
  margin: 30px;
  text-align: center;
}
/* 返回修改车次 */
.k-bd1 .k-top a {
  float: right;
  color: #005ea7;
  font-size: 12px;
}
.k-bd1 .k-tarin-number .k-tran-ico {
  background: url("../../assets/images/trains.png") no-repeat 30px 0;
  height: 32px;
  width: 199px;
  margin: 0 auto;
  margin-top: 40px;
}
.k-bd1 .k-top span {
  float: left;
  font-size: 14px;
  font-weight: 700;
  font-family: "Microsoft Yahei";
}
.k-bd1 .k-tarins h4 {
  line-height: 50px;
  color: #666;
  font-size: 20px;
  white-space: nowrap;
}
/*时间*/
.k-bd1 .k-tarins p.time {
  font-size: 32px;
  color: #333;
  visibility: visible;
}
/*日期*/
.k-bd1 .k-tarins p .date {
  font-size: 12px;
  color: #666;
}
/*车次*/
.k-bd1 .k-tarin-number {
  width: 253px;
  height: 40px;
  float: left;
  margin-top: 30px;
}

.k-bd1 .k-tarin-number p {
  height: 60px;
  line-height: 60px;
  overflow: hidden;
  text-align: center;
  font-family: "Microsoft yahei";
  position: relative;
}
.k-tarin-number p b {
  color: #333;
  font-size: 18px;
}

/*耗时*/
.k-bd1 .k-tarin-number .during {
  height: auto;
  color: #999;
}
/*车次信息结束---------------*/

/* 坐席信息-------------------------- 开始-*/
.seat-tips {
  font-size: 10px;
  font-weight: 400;
  color: #808080;
  /* vertical-align: middle; */
  margin-left: 20px;
}
/* 内容 */
.k-bd2 ul {
  zoom: 1;
  padding: 10px 20px 0;
}
.k-bd2 ul li {
  width: 226px;
  height: 80px;
  background: url("../../assets/images/ngfo-one.png") no-repeat;
  float: left;
  cursor: default;
  margin: 0 0 10px 22px;
  position: relative;
  list-style-type: none;
}
/*无票时显示背景图片*/
.k-bd2 ul .none {
  background: url("../../assets/images/ngfo-disabled.png") no-repeat;
  pointer-events: none; /*无票时禁止点击事件*/
}
/*点击选择时背景图片*/
.k-bd2 ul li.cur {
  background: url("../../assets/images/ngfo-three.png") no-repeat;
}
.k-bd2 ul .seat-box {
  width: 162px;
  height: 80px;
  display: table-cell;
  vertical-align: middle;
}
.k-bd2 ul .seat-box > div {
  display: inline-block;
  width: 100%;
}
.k-bd2 ul .seat-box .seat-item {
  line-height: 24px;
}
/*坐席*/
.k-bd2 ul .seat-box .seat-item span {
  display: inline-block;
  width: 50%;
  text-align: right;
  color: #999;
  font-size: 12px;
  white-space: nowrap;
}
/*价钱*/
.k-bd2 ul .seat-box .seat-item b {
  display: inline-block;
  width: auto;
  color: #ffae2e !important;
  padding-left: 10px;
}
.k-bd2 ul li b var {
  font-style: normal;
  font-size: 12px;
}
/*是否有票*/
.k-bd2 ul li p {
  width: 18px;
  position: absolute;
  right: 24px;
  top: 5px;
}
.k-bd2 ul li .k-enough {
  color: #ff9900 !important;
  font-weight: bolder;
}
.k-bd2 ul li p cite {
  /*color: #eb3532;*/
  display: block;
  font-style: normal;
  height: 20px;
  line-height: 20px;
}
.k-bd2 ul li cite {
  font-size: 18px;
  text-align: center;
}
/* 坐席信息-------------------------- j结束-*/

/* 乘客信息-------------------------- 开始-*/
.k-ckinfo {
  line-height: 20px;
  width: 90px;
  text-align: right;
  font-size: 12px;
  color: #666;
  margin-left: 30px;
}
.k-ckallinfo .k-ck-row .left-passener {
  width: 130px;
  height: 50px;
  font-size: 14px;
  line-height: 50px;
  font-weight: 700;
}
.k-ckallinfo .k-ck-row .left-passener .num-bg {
  display: inline-block;
  width: 32px;
  height: 20px;
  line-height: 16px;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  background: url("../../assets/images/train-grap.png") no-repeat;
  background-position: -130px -35px;
  margin-right: 5px;
}
.el-form {
  width: 800px;
  margin-left: 140px;
  /* border: 1px solid springgreen */
}
.k-ck-con .el-form .el-checkbox {
  float: right;
}
/* 添加儿童 */
.k-ck-con .add-child {
  color: #096dc9;
  float: left;
  cursor: pointer;
  font-size: 12px;
  margin-right: 20px;
}
.k-ck-con .add-child:hover {
  text-decoration: underline;
}
/* 外国人永久居留身份证选中 */
.foreignbox {
  display: block;
}
/* 添加乘客数量 */
.add-passenger {
  margin-left: 220px;
}
.add-passenger .addnum {
  color: #ff9900;
  padding: 0 5px 0 5px;
  font-weight: bolder;
}
/* 乘客信息-------------------------- j结束-*/
/* 联系人信息 */
.user-contacts {
  margin-top: 20px;
}
/* 提交订单 */
.order-submit {
  /* border: #096dc9 1px solid; */
  float: left;
  width: 100%;
  line-height: 60px;
}
.order-submit .license-text {
  float: left;
}
.order-submit .license-text a {
  text-decoration: none;
  color: #096dc9;
}
/* 提交按钮 */
.order-submit .el-button {
  width: 220px;
  line-height: 32px;
  /* margin-right: 30px; */
  float: right;
}
/*票价信息-------------------------*/
.el-collapse {
  width: 390px;
  margin-left: 5px;
}
.el-collapse >>> .el-collapse-item__header {
  font-size: 22px;
  background-color: #fff;
  color: #b3c0d1;
}
.el-collapse >>> .el-divider--horizontal {
  margin: 10px 0 20px 0;
}
.el-tag {
  cursor: pointer;
}
.od_title {
  border-top: 1px dashed rosybrown;
  /* border-bottom: 1px dashed rosybrown; */
  line-height: 50px;
}

.od_title:last-child {
  border: none;
}
.od_left_info {
  font-size: 20px;
  color: gray;
  margin-left: 10px;
}
.od_right_info {
  color: #ff9900;
  font-weight: bolder;
  float: right;
  margin-right: 20px;
}
.od_nums {
  color: #808080;
}
/*温馨提示*/
.wxts {
  width: 360px;
  height: auto;
  background-color: #fff;
  border: 1px solid #f8f8f8;
  margin-left: 15px;
  position: relative;
  margin-top: 10px;
}

.wxts li p {
  font-size: 15px;
  width: 320px;

  color: #808080;
}
</style>
